package com.bsj.power.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bsj.power.common.def.dto.path.PathSearchDTO;
import com.bsj.power.common.def.entity.pathReport.PathReport;
import com.bsj.power.common.def.vo.pls.PathReportCountVO;
import com.bsj.power.common.def.vo.pls.PathReportVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author LiJiaXin
 * @version 1.0.0
 * @description PathReportMapper
 * @time 2024/5/7 11:52
 */
public interface PathReportMapper extends BaseMapper<PathReport> {

    /**
     * 统计围栏进出次数
     *
     * @param pathSearchDTO
     * @return long
     * @author ljx
     * @time 2024/5/7 15:01
     */
    long countPathReport(PathSearchDTO pathSearchDTO);

    /**
     * 分页展示进出围栏次数信息
     *
     * @param pathSearchDTO
     * @return java.util.List<com.bsj.power.common.def.vo.pls.PathReportCountVO>
     * @author ljx
     * @time 2024/5/7 17:25
     */
    List<PathReportCountVO> pagePathReportCount(PathSearchDTO pathSearchDTO);

    /**
     * 统计区域进出详情数量
     *
     * @param pathSearchDTO
     * @return long
     * @author ljx
     * @time 2024/5/7 19:23
     */
    long countPathReportDetail(PathSearchDTO pathSearchDTO);

    /**
     * 区域进出详情
     *
     * @param pathSearchDTO
     * @return java.util.List<com.bsj.power.common.def.vo.pls.PathReportVO>
     * @author ljx
     * @time 2024/5/7 19:24
     */
    List<PathReportVO> pathReportDetail(PathSearchDTO pathSearchDTO);

    /**
     * 批量存储进出通知
     *
     * @param list
     */
    void bathAddPathReport(List<PathReport> list);

    /**
     * 分组统计进出区域人数
     *
     * @param startTime
     * @param endTime
     * @return java.util.Map<java.lang.String, java.lang.Long>
     * @author ljx
     * @time 2024/10/16 14:29
     */
    Map<String, Long> groupCountByType(@Param("startTime") String startTime, @Param("endTime") String endTime);
}
